< Back
# Spring data sample configuration. Suppose we have `dev/schema.sql` and `dev/data.sql` in `resources` directory. The following is a comfortable development configuration which can tell if we did something wrong. ```yaml server: port: 8081 spring: sql: init: schema-locations: - classpath:dev/schema.sql data-locations: - classpath:dev/data.sql jpa: show-sql: true hibernate: ddl-auto: validate properties: hibernate.format_sql: true hibernate.generate_statistics: true datasource: username: sa password: url: jdbc:h2:mem:item; driver-class-name: org.h2.Driver h2: console: enabled: true logging: level: org: hibernate: SQL: debug type: descriptor: sql: trace stat: internal: trace ``` where `schema.sql` could be ```sql create table item ( id bigint primary key auto_increment, name varchar(50) ); ``` and where `data.sql` could be ```sql insert into item (name) values ('apple'), ('orange'), ('pingpong'), ('chess'), ('duck'); ``` Learn more https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.core-concepts